package com.xzy.service;

import com.spring.*;
import lombok.Getter;

/**
 * @author xzy
 * @date 2021/11/49:09
 */
@Getter
@Scope("prototype")
@Component("userService")
public class UserServiceImpl implements UserService, BeanScopeAware, InitializingBean {

    private String beanName;

    @Override
    public void setBeanScope(String beanScope) {
        this.beanName = beanScope;
        System.out.println("beanScope被注入:" + beanScope);
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("属性设置完毕...");
    }

    @Override
    public void sayHello() {
        System.out.println("hello");
    }
}
